<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>支付</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#bankCardNo").focus();
			$("#inputForm").validate({
				rules: {
				},
				messages: {
					newBankCardNo: {equalTo: "输入与上面相同的卡号"}
				},
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body class="bgf5 padd80">
	<div align="center">
		<h1>请使用微信扫码支付</h1>
		<img align="center" src="http://qr.topscan.com/api.php?text=${url}"/>
		<h1>支付金额：${money} 元 </h1>
		<div>
			<span onclick="wancheng('${orderId}')">
				<input class="btn" type="button"  value="支付完成" />
			</span>
			<span onclick="quxiao('${orderId}')">
				<input class="btn" type="button"  value="取消订单" />
			</span>
		</div>
		<input type="hidden" id="orderId" value="${orderId}"/>
	</div><!-- channel 2是海外购，3是预定商品-->
	<script type="text/javascript">
		function wancheng(id){
		//	alert("支付完成");
			window.location.href="${ctx}/sys/shopInStorehouse/reserveInStorehouse/"+id+"?channel="+${channel};
		}
		function quxiao(id){
		//	alert("取消订单");
			var type='${type}';
			window.location.href="${ctx}/sys/shopInStorehouse/deleteOrder/"+id+"?type="+type+"&channel="+${channel};
		}
	</script>
</body>
</html>